#include "../common/ListNode.h"

using namespace std;

/* 线性查找（链表） */
ListNode* linearSearchLinkedList(ListNode* head, int target) {
    while (head != nullptr) {
        if (head->val == target)
            return head;
        head = head->next;
    }
    return nullptr;
}
